package com.zhiqiang.gameserver.entity;

/**
 * 消息传递主体entity
 */


import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

import java.util.Arrays;

/**
 * @author YAO
 */
public class ZQGameServerEntity {
    /**
     * 包头加内容的总长度
      */
    private int len;
    /**
     * 消息类型
     */
    private int msgType;
    /**
     * uid 玩家ID
     */
    private int uid;
    /**
     *  请求码 主动发 seq 就填 0  其他按原值返回
     */
    private int seq;
    /**
     * 结果
     */
    private int result;
    /**
     * 错误码
     */
    private int v6;
    /**
     * 保留字段
     */
    private int v7 = 0 ;
    private int v8 = 0;
    private int v9 = 0;
    private int v10 = 0;
    private int v11 = 0;
    private int v12 = 0;
    /**
     * 存放实际body数据,用于protobuf解码成对应message
     */
    private byte[] data;

    /**
     *
     * @return
     */
    private Channel channel;


    public int getLen() {
        return len;
    }

    public void setLen(int len) {
        this.len = len;
    }

    public int getMsgType() {
        return msgType;
    }

    public void setMsgType(int msgType) {
        this.msgType = msgType;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public int getV6() {
        return v6;
    }

    public void setV6(int v6) {
        this.v6 = v6;
    }

    public int getV7() {
        return v7;
    }

    public void setV7(int v7) {
        this.v7 = v7;
    }

    public int getV8() {
        return v8;
    }

    public void setV8(int v8) {
        this.v8 = v8;
    }

    public int getV9() {
        return v9;
    }

    public void setV9(int v9) {
        this.v9 = v9;
    }

    public int getV10() {
        return v10;
    }

    public void setV10(int v10) {
        this.v10 = v10;
    }

    public int getV11() {
        return v11;
    }

    public void setV11(int v11) {
        this.v11 = v11;
    }

    public int getV12() {
        return v12;
    }

    public void setV12(int v12) {
        this.v12 = v12;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    @Override
    public String toString() {
        return "ZQGameServerEntity{" +
                "len=" + len +
                ", msgType=" + msgType +
                ", uid=" + uid +
                ", seq=" + seq +
                ", result=" + result +
                ", v6=" + v6 +
                ", v7=" + v7 +
                ", v8=" + v8 +
                ", v9=" + v9 +
                ", v10=" + v10 +
                ", v11=" + v11 +
                ", v12=" + v12 +
                ", data=" + Arrays.toString(data) +
                ", channel=" + channel +
                '}';
    }
}
